package org.third.security.fips;

import java.security.Provider;
import java.security.Provider.Service;

import sun.security.jca.ProviderList;
import sun.security.jca.Providers;

/**
 * 
 */
public class SSLConnection {
    public static void main(String[] args) {
        try {
            // SSLContext sslContext= SSLContext.getInstance("TLS");
            // SSLContext.getInstance("SSL");

            ProviderList providerList = Providers.getProviderList();
            for (Provider provider : providerList.providers()) {
                System.out.println("========================================");
                System.out.println(
                        provider.getName() + ": " + provider.getInfo() + provider.getVersion() + provider.getClass());
                for (Service service : provider.getServices()) {
                    System.out.println("  " + service.getAlgorithm() + ": ");
                   for(String s: service.toString().split("\n")){
                       System.out.println("    "+s);
                   }
                }

            }
            System.out.println(providerList);

            Service arg3 = providerList.getService("SSLContext", "SSL");
            // for (int arg2 = 0; arg2 < this.configs.length; ++arg2) {// 330
            // Provider arg3 = this.getProvider(arg2);// 331
            // Service arg4 = arg3.getService(arg0, arg1);// 332
            // if (arg4 != null) {// 333
            // return arg4;// 334
            // }
            // }
            //
            System.out.println(arg3);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}